<%@page import="com.wanmait.travel.vo.Pager"%>
<%@page import="com.wanmait.travel.vo.City"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
	<%
	String path=request.getServletContext().getContextPath();
	Pager pager=(Pager)request.getAttribute("cityAll");
	List<City> cityAll=(List<City>)pager.getData();
		for(int i=0;cityAll!=null&&i<cityAll.size();i++){
			City city=cityAll.get(i);
	%>
	<input type="button" value="<%=city.getName() %>" onclick="showCity('<%=city.getId() %>')">
	<%}%>
	
	<div>
	<%if(pager.hasPrev()){ %>
	<a href="#" onclick="cityPage('<%=pager.getPageNum()-1%>')">上一页</a>
	<%} %>
	
	
	<%for(int i=1;i<=pager.getPageCount();i++){%>
	<a href="#" onclick="cityPage('<%=i %>')"><%=i %></a>
	<%} %>	
	
	<%if(pager.hasNext()){ %>
	<a href="#" onclick="cityPage('<%=pager.getPageNum()+1%>')">下一页</a>
	<%} %>
	</div>